/*
 * Filename:    IAuditDispatchService.java
 * Copyright:   2014 中国平安保险（集团）股份有限公司 版权所有
 * Company:     平安科技养老险及健康险系统开发部
 * Create at:   2014-11-11
 */
package com.paic.mhis.hcpms.audit.biz.service;

import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.paic.mhis.core.auth.biz.service.UserDetails;
import com.paic.mhis.hcpms.audit.dto.AuditDispatchRequestDTO;
import com.paic.mhis.hcpms.audit.dto.AuditDispatchResponseDTO;
import com.paic.mhis.hcpms.audit.dto.AuditDispatchUserRequestDTO;
import com.paic.mhis.hcpms.audit.dto.AuditDispatchUserResponseDTO;
import com.paic.mhis.hcpms.audit.dto.AuditUserInfoDTO;
import com.paic.mhis.hcpms.audit.dto.BatchSubmitResponseDTO;

public interface IAuditDispatchService {

	/**
	 * 根据角色名称加载该角色下的用户
	 * 
	 * @param roleName
	 * @return
	 */
	public List<AuditUserInfoDTO> queryAuditUserInfoByRoleName(String roleName);

	public AuditDispatchResponseDTO queryMedicalInfo(
			AuditDispatchRequestDTO requestBean);

	public AuditDispatchResponseDTO queryStaffInfo(
			AuditDispatchRequestDTO requestBean, UserDetails user);

	public AuditDispatchResponseDTO queryInsuranceInfo(
			AuditDispatchRequestDTO requestBean, UserDetails user);

	public AuditDispatchResponseDTO queryAuditProblemsDTO(
			AuditDispatchRequestDTO requestBean);

	/**
	 * 审核岗位 对事件的分配
	 * 
	 * @param requestBean
	 * @throws Exception
	 */
	public Map<String, Object> dispatchTaskByUserCode(
			AuditDispatchUserRequestDTO requestBean, JSONObject json,
			UserDetails user) throws Exception;

	/**
	 * 审核岗位 审核是否需要调查 的分配任务
	 * 
	 * @param requestBean
	 */
	public void auditDispatchTaskSurvey(
			AuditDispatchUserRequestDTO requestBean, UserDetails user,
			JSONObject transferJson) throws Exception;

	/**
	 * 审核岗位 审核不需要调查 流程结束了
	 * 
	 * @param requestBean
	 */
	public Map<String, Object> aduitSuveryDisagreeConfirm(
			AuditDispatchUserRequestDTO requestBean, JSONObject transferJson,
			UserDetails user, Map<String, Object> result) throws Exception;

	public String queryAuditCodeDictionaryDesc(String codeType, String code);

	/**
	 * 处理暂存的逻辑
	 * 
	 * @param requestBean
	 */
	public AuditDispatchUserResponseDTO processTempSave(
			AuditDispatchUserRequestDTO requestBean, String type,
			JSONObject transferJson, String userName) throws Exception;

	/**
	 * 批量处理事件审核的逻辑
	 * 
	 * @param listCodes
	 * @param user
	 * @param opinion
	 * @param opinionDesc
	 * @return
	 */
	public BatchSubmitResponseDTO processBatchSubmitInfo(String[] listCodes,
			UserDetails user, String opinion, String opinionDesc)
			throws Exception;

	/**
	 * 批量处理事件管理
	 * @param problemCodeList
	 * @param user
	 * @return
	 * @throws Exception
	 */
	public Map<String, Object> problemManagementBatchSubmit(
			String[] problemCodeList, UserDetails user) throws Exception;

}
